<template>
	<view class="wrapper">
		<iframe :src="mysrc" id="mainIframe"></iframe>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				mysrc:''
			}
		},
		onReady() {
			
			var frame = document.getElementById('mainIframe')
			frame.onload = function () {
			    var u = navigator.userAgent
			    var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
			    if ( isiOS ) {
			        var iframebody = frame.contentWindow.document.body;
			        console.log(iframebody)
			        iframebody.style.width = document.body.clientWidth + 'px';
			        // alert('iphone')
			    }
			}
		},
		onLoad(e) {
			this.mysrc=e.mysrc
		}
	}
</script>

<style>
#mainIframe{
	width: 750rpx;
	height: 100%;
	border: 0;
}
</style>
